const glob = require('glob')
const {readFileSync, writeFileSync} = require('fs')

glob('**/*.vue', {}, function(err, files){
  for (let filename of files){
    let cont = readFileSync(filename, 'utf8')
    cont = cont.replace(/(\d+|\.\d+|\d+\.\d+)rem/g, (m, p) => parseFloat((p * 15).toFixed(2)) + 'px') 
    writeFileSync(filename, cont)
  }
})